<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
  var a = 1;
  var b = a;
  b++
  console.log(a,b)


  var obj = {flag:1}
  var obj2 = obj;
  obj2.flag++
  console.log(obj,obj2)


</script>
</html>